package com.tonggedata.dataapi.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;

/**
 * api配置表，api核心
 *
 * @author tonggedata
 * @date 2022-06-19 12:59:36
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "`api_config`" , autoResultMap = true)
public class ApiConfig extends Model<ApiConfig> {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    @TableField(value = "`id`" )
    private Long id;
    /**
     * api名字
     */
    @TableField(value = "`name`" )
    private String name;
    /**
     * 路径
     */
    @TableField(value = "`path`" )
    private String path;
    /**
     * 版本
     */
    @TableField(value = "`version`" )
    private String version;
    /**
     * 描述
     */
    @TableField(value = "`desc`" )
    private String desc;
    /**
     * 分组id
     */
    @TableField(value = "`api_group_id`" )
    private Long apiGroupId;
    /**
     * 数据源id
     */
    @TableField(value = "`datasource_id`" )
    private Long datasourceId;
    /**
     * 1 已发布 0 已下线
     */
    @TableField(value = "`status`" )
    private Integer status;
    /**
     * 请求方式 1 GET 2 POST
     */
    @TableField(value = "`request_type`" )
    private Integer requestType;
    /**
     * 协议: 1 http  2 https  3 同时支持http和https
     */
    @TableField(value = "`protocol_type`" )
    private Integer protocolType;
    /**
     * 请求参数封装，json格式
     */
    @TableField(value = "`request_param_json`" )
    private String requestParamJson;
    /**
     * 排序参数封装，json格式
     */
    @TableField(value = "`order_param_json`" )
    private String orderParamJson;
    /**
     * 返回参数封装，json格式
     */
    @TableField(value = "`response_param_json`" )
    private String responseParamJson;
    /**
     * 数据返回格式样例 json
     */
    @TableField(value = "`response_example_json`" )
    private String responseExampleJson;
    /**
     * 1 可视化,2 sql脚本,3 注册
     */
    @TableField(value = "`api_config_type`" )
    private Integer apiConfigType;
    /**
     * 向导模式：SQL脚本内容; 注册模式:预留
     */
    @TableField(value = "`content_json`" )
    private String contentJson;
    /**
     * 是否分页
     */
    @TableField(value = "`paged`" )
    private Integer paged;
    /**
     * 创建人
     */
    @TableField(value = "`create_user`" )
    private String createUser;
    /**
     * 更新人
     */
    @TableField(value = "`update_user`" )
    private String updateUser;
    /**
     * 创建时间
     */
    @TableField(value = "`create_time`" )
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField(value = "`update_time`" )
    private Date updateTime;
    /**
     * 删除(0正常，1已删除)
     */
    @TableLogic
    @TableField(value = "`deleted`" )
    private Integer deleted;

}
